﻿using Lucene.Linq.Mapping;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
using Lucene.Linq.Search;

namespace Lucene.Linq.Demo2
{
    [Document(DefaultAnalyzer = typeof (SimpleAnalyzer))]
    public class Country : IIndexable, IHit
    {
        [Field(FieldIndex.Tokenized, FieldStore.Yes, Analyzer = typeof (StandardAnalyzer), IsDefault = true)]
        public string Name { get; set; }

        [Field(FieldIndex.Tokenized, FieldStore.Yes, Analyzer = typeof (StandardAnalyzer), IsDefault = false)]
        public string FormalName { get; set; }

        [Field(FieldIndex.Tokenized, FieldStore.Yes, Analyzer = typeof (SimpleAnalyzer), IsDefault = false)]
        public string TwoLetterCode { get; set; }

        [Field(FieldIndex.Tokenized, FieldStore.Yes, Analyzer = typeof (SimpleAnalyzer), IsDefault = false)]
        public string ThreeLetterCode { get; set; }

        #region IHit Members

        public int DocumentId { get; set; }

        public float Relevance { get; set; }

        #endregion
    }
}